'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {

  const { router, controller } = app;
  // router.post('/login', controller.user.login);
  // router.post('/refresh-token', controller.user.refreshToken);
  // router.put('/user', controller.user.modifyUser);
  // router.get('/user-list', controller.user.userList);

  router.post('/app/token', controller.application.token);

  router.get('/categories', controller.categories.list);

  router.get('/tortious-list', controller.tortious.tortiousList);
  router.get('/latest-tortious-info', controller.tortious.latestTortiousInfo);

  router.get('/tortious', controller.tortious.showTortiousList);

  // erp not support bulk delete ,so change post
  router.post('/tortious', controller.tortious.bulkDestroyTortious);
  router.put('/tortious/:tort_word_id', controller.tortious.recoveryOrDelTortious);

  // 侵权词检测
  router.post('/infringement-check', controller.infringementCheck.infringementCheck);

  // 侵权词检测
  router.post('/infringement-check-multi', controller.infringementCheck.multiInfringementCheck);

  // 检测结果
  router.get('/check-info/:sign', controller.infringementCheck.checkInfo);

  // test
  router.post('/add-test', controller.infringementCheck.addTest);


};
